import 'package:get/get.dart';
import 'package:get/get_common/get_reset.dart';

enum PairState{
  startScan(0x01),
  scanning(0x02),
  paired(0x03),
  pairSuccess(0x04),
  disconnected(0x05),
  unknow(0xff)
  ;
  final int value;
  const PairState(this.value);
  static PairState from(int value){
    final state = PairState.values.firstWhereOrNull((test) => test.value == value);
    return state ?? PairState.unknow;
  }
}